# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-inflect
pkgver=4.1.0
pkgrel=1
pkgdesc="Correctly generate plurals, singular nouns, ordinals, indefinite articles; convert numbers to words"
url="https://github.com/jazzband/inflect"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-setuptools py3-setuptools_scm py3-toml"
checkdepends="py3-pytest py3-pytest-flake8 py3-pytest-cov py3-pytest-black"
source="https://pypi.python.org/packages/source/i/inflect/inflect-$pkgver.tar.gz"
options="!check" # Flake8 fails https://github.com/jazzband/inflect/issues/109
builddir="$srcdir/inflect-$pkgver"

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$PWD/build/lib" pytest --ignore setup.py
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="9a2ba4777f01475390976f3ac28f046d39d1f86cfdafd161cc7c8d33526aca35d44e6598ccf2a0b68d3511a64b67ed0991b51c78bda8f279cd706fd29a3fa514  inflect-4.1.0.tar.gz"
